{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="addcontent">
    <form class="ajaxForm" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="id" value="{if isset($info['id'])}{$info['id']}{/if}">
        <table class="table">
            <tr>
                <td class="tl">
                    <span>上级id</span>
                </td>
                <td>
                    <select name="pid">
                        <option value="0">无上级</option>
                        {if $groupList}
                        {foreach $groupList $key $val}
                        {if array_path($info,'id',0)!=$val['id']}
                        <option  {if array_path($info,'pid',0)==$val['id']} selected {/if}  value="{$val['id']}">{$val["name"]}</option>
                        {/if}
                        {/foreach}
                        {/if}
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>* </strong>名称</span>
                </td>
                <td>
                    <input class="short" type="text" name="name" value="{if isset($info['name'])}{$info['name']}{/if}">
                    <input type="color" name="className" value="{if isset($info['className'])}{$info['className']}{else}#000000{/if}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span>排序</span>
                </td>
                <td>
                    <input class="long" type="number" name="sort" value="{if isset($info['sort'])}{$info['sort']}{/if}">
                </td>
            </tr>
        </table>
    </form>
    <div class="yifang-button">
        <button class="btns submit ajaxBtn" type="button" data-submit-url="{YIFANG_ROUTE_PREFIX}/friendLinkGroup" data-form=".ajaxForm" data-location-url="{YIFANG_ROUTE_PREFIX}/friendLinkGroup/index" data-close="5">
            确认
        </button>
        <button class="btns cancel">取消并返回</button>
    </div>
</div>
<script src="__ADMIN_STATIC__/js/addContent.js?random={extendSetting('random')}"></script>
{include 'admin/layout/file_upload_script_auto'}
{include 'admin/layout/footer'}